package com.icss.th.question.service;

import com.icss.th.common.FacadeFactory;
import com.icss.th.common.exception.ThException;
import com.icss.th.question.facade.IOptionFacade;

public class OptionService 
{
	private static IOptionFacade optionFacade = (IOptionFacade)FacadeFactory.getInstance(IOptionFacade.class);
	
	/*
	 * 保存解析
	 * content 内容
	 * ip 用户IP
	 */
	public static void saveExplain(String content, String examId, String ip) throws ThException
	{
		try 
		{
			optionFacade.saveExplain(content, examId, ip);
		} 
		catch (ThException e) 
		{
			throw e;
		}
	}
	
	/*
	 * 保存纠错
	 * content 内容
	 * optionType 错误类型
	 * ip 用户IP
	 */
	public static void saveCorrect(String content, String examId, String optionType, String ip) throws ThException 
	{
		try 
		{
			optionFacade.saveCorrect(content, examId, optionType, ip);
		} 
		catch (ThException e) 
		{
			throw e;
		}
	}
}
